﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;

/// <summary>
/// Summary description for Config
/// </summary>
public class Config
{
	public Config()
	{
		
	}

    public enum enumUserFiles : int { Task, Mail, File, Temp };

    //Config Directory Switcher
    public static string GetUserFileDirectory(enumUserFiles type,string userName){
        string returnDir = string.Empty;
        switch (type)
        {
            case enumUserFiles.Task:
                returnDir = fileDirectory + userName + "\\" + taskAttatchmentsDirectory;
                break;
            case enumUserFiles.Mail:
                break;
            case enumUserFiles.File:
                break;
            case enumUserFiles.Temp:
                returnDir = tempUploadDirectory + userName + "\\" + taskAttatchmentsDirectory;
                break;
        }

        if (returnDir != string.Empty)
        {
            if (!Directory.Exists(returnDir))
            {
                Directory.CreateDirectory(returnDir);
            }
        }

        return returnDir;
    }

    //Values

    //Root Temp Dir
    private static string fileDirectory = "C:\\OfficeOnlineFiles\\";

    public static string FileDirectory
    {
        get
        {
            return fileDirectory;
        }
    }

    //Task Directory
    private static string taskAttatchmentsDirectory = "attatchments\\tasks\\";

    public static string TaskAttatchmentsDirectory
    {
        get
        {
            return taskAttatchmentsDirectory;
        }
    }

    //TempUpload Directory
    private static string tempUploadDirectory = "C:\\OfficeOnlineTempFiles\\";

    public static string TempUploadDirectory
    {
        get
        {
            return tempUploadDirectory;
        }
    }

    //Date Format
    private static string dateTimeFormat = "MMM dd, yyyy";

    public static string DateTimeFormat
    {
        get
        {
            return dateTimeFormat;
        }
    }
    


    //Task Status
    private static string[] taskStatus = { "Done", "In Progress", "Not Yet Started", "Stopped", "Discontinued" };

    public static string[] TaskStatus
    {
        get
        {
            return taskStatus;
        }
    }


    //Upload Operations
    private static string[] uploadOperation = { "Task", "Mail", "File"};

    public static string[] UploadOperation
    {
        get
        {
            return uploadOperation;
        }
    }

}
